const isProduction = process.env.NODE_ENV === 'production';

export const realPx = (px) => {
  return isProduction ? px : px / 10
  // return isProduction ? px : px / 12  // 缩小12倍
}

export const formatSeconds = (value) => {
  var theTime = parseInt(value);// 秒
  var middle = 0;// 分
  var hour = 0;// 小时

  if (theTime > 60) {
    middle = parseInt(theTime / 60);
    theTime = parseInt(theTime % 60);
    if (middle > 60) {
      hour = parseInt(middle / 60);
      middle = parseInt(middle % 60);
    }
  }
  if (theTime < 10) {
    theTime = '0' + theTime
  }
  if (middle < 10) {
    middle = '0' + middle
  }
  if (hour < 10) {
    hour = '0' + hour
  }
  return `${hour}:${middle}:${theTime}`;
}
